home *** CD-ROM | disk | FTP | other *** search
/ SCI Games E3 2005 Press Kit (USA) / SCI Games E3 2005 Press Kit (USA).bin / runme_mac.swf / scripts / DefineSprite_294 / frame_45 / DoAction.as
Text File  |  2005-05-05  |  1KB  |  70 lines

  1. function moveIndicator(xpos)
  2. {
  3.    trace(rollover.indicator);
  4.    new mx.transitions.Tween(rollover.indicator,"_x",mx.transitions.easing.Bounce.easeOut,rollover.indicator._x,xpos,0.8,true);
  5.    new mx.transitions.Tween(rollover.glow,"_x",mx.transitions.easing.Bounce.easeOut,rollover.indicator._x,xpos,0.8,true);
  6.    dropzone.play();
  7. }
  8. function setStartPos(x)
  9. {
  10.    rollover.indicator._x = x;
  11.    rollover.glow._x = x;
  12. }
  13. postion = new Array(0,105,563,670);
  14. bt1.onRollOver = function()
  15. {
  16.    moveIndicator(postion[0]);
  17. };
  18. bt1.onRelease = function()
  19. {
  20.    _root.contentText.InitContentPanel("aboutUs");
  21. };
  22. bt2.onRollOver = function()
  23. {
  24.    moveIndicator(postion[1]);
  25. };
  26. bt2.onRelease = function()
  27. {
  28.    _root.contentText.InitContentPanel("releaseDate");
  29. };
  30. bt3.onRollOver = function()
  31. {
  32.    moveIndicator(postion[2]);
  33. };
  34. bt3.onRelease = function()
  35. {
  36.    _root.contentText.InitContentPanel("contactUs");
  37. };
  38. bt4.onRollOver = function()
  39. {
  40.    moveIndicator(postion[3]);
  41. };
  42. bt4.onRelease = function()
  43. {
  44.    _root.openMessageBox(_root.presskit);
  45. };
  46. bt6.onRollOut = function()
  47. {
  48.    if(rollover.indicator._x > 400)
  49.    {
  50.       moveIndicator(850);
  51.    }
  52.    else
  53.    {
  54.       moveIndicator(-200);
  55.    }
  56. };
  57. bt6.onRollOver = function()
  58. {
  59.    if(rollover.indicator._x > 400)
  60.    {
  61.       moveIndicator(850);
  62.    }
  63.    else
  64.    {
  65.       moveIndicator(-200);
  66.    }
  67. };
  68. setStartPos(-200);
  69. stop();
  70.